Merged #1148 into master.