Additional bugfixes and added some tests
Some more bugfixes
Merge remote-tracking branch 'remotes/origin/client_bugfix1' into develop