fix build breaks and mangled history (not worth correctly rebasing at this point)