Fixes a bug where parsing from a file could halt early.