fixing draw bug