fix for #305