Fixed garbage collection issue for 'cons'