Z axis correction