added (somewhat) less ugly Linux support.