fixed tutorial error and detection