fix issues found when testing execution context