Closes #1148
Merge branch '4.0'