Jag/unit test fixes