Fixed some errors. Now linux build works.