bugfix for removing files