added tests for ValidLanguageTag and fixed some errors