Fix flow control