Fixed loading of noninitialized array

Clear function added