fixed font bug, added conditions