Fixed errors with object retaining data.