Bugfix in prepare elements result