fixes

this is throwing exception as we didn't change the pointer after deleting object, so we might double delete it later