Fix if branch and option syntax errors