allow set callback and environment together
Merge remote-tracking branch 'alex1line/master' into development