fixed overdrawing bug