Fixed TypeError when using max_entries on some settings.