Fixed bug which caused rendering to stop randomly.