Fixes for compiling on ubuntu