fixing rhs handling with non-zero G