improved font flow and fixed layout bugs