possible fix for #585