Error in error code 2 detection fixed