Repairing scale bug