fix problems when portint to linux