Fix handling of trash objects