fixed deleting error for all controllers