Fix "flush" readline throwing exception.