fixed language checking method bug