Fix bug in loadVisibleBodies loop