fix elemlib exception