Fixing `wait` method, because it wasn't supporting multiline response.