make code more robust against changes in version element type