[Fix] Fix typo and small logic bug