Fixed bugs for Linux