another bugfix: first check if objects are required, then look for them