correcting some wrong dispatches and return types in complex if_else

this replaces #762 which was flawed