Fix bug with delete