Fixed some bugs with the initialization of arrays and objects