bugfix for previous commit: didn't check for empty object list properly