Scale added and bug fixed