fix arraycollection behavior and tests