Fix readline bug(s)