Bug (add to null array) fixed.