Fixes to make compile on linux