fixing issue where inline-json was being executed before draw functions
were defined