Fix for #534