Fix compile errors
Merge pull request #790 from markewallace/FixAutomationCompileError

Fix compile errors