Fixing delete function
Fixing delete function