fixed issue with rendering (render call wasn't getting executed because it was in the test function