CLOUD-220 Corections, added unit test