fixing dependent scaling issue and adding more debug logs