Fix NPE when entries is somehow a empty list