fixed header reading, added parsing long names