Fix some error when creating token