Fixing compilation and test errors.