fixed linux compilation (mostly)