Changed flg from False to True