Testcode fixes