VArious fixes