fixed wandering filename problem