bump to v1.7.1, fix UnboundLocalError