Updates to the debug function. The stack is not getting update in some
instances.