Fix wrong property values when additional element is created to hold the markup