Fixed domain bug in integrate