Fix handling sprites when there are more than 10 on a single line