Fix some bugs in mono-camera calibration