fixed several small issues with drawing