some fixes for Linux