Fix bug flow order