Fixed the draw code