Fix for #6498