Fixed broken convertElem method