Fixed various testbed bugs