Added fixes for layer3/4/7 elements not writing the required datatype attribute upon export