Fixing ls
Fixed some bugs for calibration.