Fix parsing and test