Fixing delete error