Fixes to compiling issues