fix some font rendering bugs