fixed parsing and rendering errors
added tests for collections