This should be "%d" % vals, no?  Same below.