fix tag order

Also don’t populate with <sizes> if no size data is available.