fix path drawing bugs