Fix authorize bug.