Fix loop count parsing.