added fixes to compile on Linux successfully