fixed some drawing bugs