Possible fix for #168, @mkohlhase please check