Fixed start and stop render functions to prevent bugs.