Fix compilation errors (cc @Lawdy)