Fixing "delete action" bug