#401

fix #401 + bump the version to 0.7.1

If this is ok:
 * will cherry pick this into master
 * tag
 * release on pypi
 * release on stackbrew