Change find_tag return type to int64_t, fix a bug