fix bug in re-used function name