fixed  equality checks for alternatives
fixed  equality checks for alternatives