Added extra elements handling