Fix some parsing bugs.