Added missing cleanup for renderObj