Compilation fix
Merge pull request #1 from mingulov/compile_fixes

Merged, thanks.