Added kind of nasty hack to make sure context initialization is defined. Will need to clean this up later