Fixes some compile errors