fix typo
fix api bug. add api test