Fix a typo that cause a problem that returns 'undefined' value