fixed getfilename bug