possible fix for issue #167; adding tests soon