fixed bug on incorrect state mamagement for collections and arrays