Fix to async flat optimize call