fix #30
fix #29 that was reopened. See issue comments