Exit in a function kills shell, oops