Fix crash of bgLex on linux. No idea why this worked on Windows it should have crashed as well.