Fix compilation and other trivialities