add design for scaleselector and kill some bugs