fixes #3268: limit number of rendered items