fix exception when changing font