fix for #583