Fixed Linux related bugs