Fix iteration of stored codes