possible fix for #589

test before use