fix compilation errors when debug flag enabled
fix compile errors in debug mode
Merge pull request #2679 from cerati/fix-compile-errors-debug-flag

Fix compile errors debug flag