Fixed a bug that inverted whether injections had taken place or not.
Added thread safety warning when accessing mainContext from a background thread if it's the first time it is accessed.