Fix for #967