Fixing auto-scaler issue when primary enabled - PAAS-55
Merge pull request #41 from ravihansa3000/master

Went through the patch and patch looks good!