Fixed issue with buffer not clearing before getline