fix tests in tweak.py