Added save-context call to typecheck method