Fixed parsing bugs