Fixed pointer bug and added delay to imu calibration