Removed undefined error if no entries are present.