Update build to 40
Merge branch 'release/1.1_40' into development
Improve tests