quick-fix for #123 needs some improvements