Fix compilation errors
Merge pull request #4247 from wmtan/FixCompilationErrors

Fix compilation errors