Fixed some parsing bugs.