fixing potential boolean coercion bug for alternatives parsing