Fixed retrieval of elements
Merge branch 'master' into testing