Bug fixes with scaling.