Compile error and warnings fixes

Warnings gonna be fixed!