Merged #1116 into master.