change %ld to %PRId64