Changes to make delete work