Fixed addCode; element creating