bug resolved in get_preferred_lang

modified get_preferred_lang template tag.