redone: parser: fix optimise error check
*: small improvements