Fixed unit tests and server
Version bumped up to v4.0.2