More test script bugfixes :(