parser: fixed if behaviour