fix filelength bug