fixes to compiling code