backpoted fix for #670