Draw engine bug fixes