Store sol.main in the registry. Fixes crash when doing sol = nil.