updates to not store undefined element values