Fix compilation errors and ioc running with only one pv