fixed reversed logic on deleting properties