Fixed error due to non-unique element ids