fixed function return type bug.