fixed cleanup error in object