Fixed nullpointer exception for PVArray repair