change behavior so that max_entries limits the number od displayed elements
instead of displaying all or nothing