Cleanup to make all platforms work.