fixed 'onEnd' bug where render was not being called and an error was thus, being thrown