Wrong check in Code samples