removed the writing of some zeros to an array which was already initialized with 0
merged zero writing fix from master