Fix for #571.