tweak to be slightly more cautious in use of stack