fixed some bugs with linux