Fix for #322