Corrected the update/render loop.