Fixed getline function, other windows related fixes