fix undefinedundefined error when use lib/index directly