fixes for getAllElements