fixed error_handler code in dispatch to point to controller last seen in the stack.