Fix for #545