Fixed some bugs with ArrayMap