Another workaround/hack to deal with non breaking spaces. Also some minor adjustments to support the planned AFP renderer