preliminary Linux support, bugfixes