Fixed a bug where the draw code was