Fixed update to happen only after checking for deletion