Fixes a few compile errors