Fix compile errors in build