small fixes for collections implementation