fix scalebar bug, and it can use it smoothly