Fixed Linux issues. Also reduced speed a little bit.