Fixed nullpointers on random PVArray and Battery