Fix for Delete functtionality