fixed check for returned objectIds