Fixed initializeProperties() to preserve Element objects