corrections for passing the state correctly in the delete calls