bugfix: fix error comment and function

Signed-off-by: Yi-Feng Tzeng <yftzeng@gmail.com>