fixing case where id list is empty
Merge pull request #219 from creighton/improve

fixing case where id list is empty