added limit to number of stack traces