logic fix; special handling for RETURN_CODE_BRANCH