Fix typo and unset the correct object after rendering