Additional cleanup to transitions. Also fixes test case for Mac.