Fix for #562