Fixes problem with file name handling