Read ints in correctly; stopping on any non-int key.