fix some bugs
Merge pull request #47 from Bugeda/BGlex

fix some bugs