fixing up some rectangle drawing bugs