Compile fixes

Here are some fixes I needed to build your tree without errors or warnings.