Fixed bugs when processing files that contain hydrogens