Update def, remove console.log, fix type don't exist issue.