Closes #1218
Merge branch '4.0' into 4.1
Merge branch '4.1'