system test bugfixes (test not complete)