Fixed bugs with linux build