Fix for #604