fixing bug removing files