fixed object orientation

detection of several objects at the same time
please do not change the default indentation, it makes it impossible to track what has changed: keep whatever was there before (2 spaces ?)