Fixed an error with delete. Everything seems to be working now.