Cluster scaling bug fixing

Besides the bug it fixes unit tests

Fixes: bug #1202622

Change-Id: I4d6969d1d3a18b20347582efcf535483da400c13