Fixed compiler warnings and error on linux..