Fixed exception with drawing