Fixed context errors and a couple of typos to get the tests working again