Fix for #678