removed local allowedLangs
changed if clause