Fixed a whole bunch of bugs causing parsing errors