Fix never ending render bug.