Add limitation for result size

Signed-off-by: Krzysztof Opasiak <ups100@tlen.pl>