added and fixed some test and little fixes on server