fixed parsing loops for collection