Rectify delete bug