Possible fix for #664