fixed database bug when deleteing project