fixing tests to handle newly introduced ctx.