fix bugs
fix tests and test server