fixed bug crash and put back reversing of collections