Updated generator so it's possible to exit the interpreter loop from a handler function
Fixed regressions