fix result limit logic