Fix parse error and small fixes