fix lots of compiler problems in linux