Bugfixes in text-rendering