Fix readline interface closing