prevent stack overflows.