Fix for "Error when the list of objects is empty" issue

See http://dandelion-forum.48353.x6.nabble.com/Error-when-the-list-of-objects-is-empty-td498.html for details.