Fixed ReadLine implementation.