Fixed Linux implementation bugs. In the middle of Windows implementation.: