fixed fseek problem