fixed: check for undef in payment return first before checking state.