Change how to avoid `stack too deep`

Fix for #17