fix function def error