bugfix change the function name in if condition