Fixed draw code, seems to be working correctly now