Closes #1161 (hopefully)