fixed bug with drawing