Fixed frame numbering in xml output