Fix bug that causes fields to be read only when an element is first create