fixed problem with deleting files