fixed the logic in ProjectsController delete