fixed bug when deleting a project