fixes sort error on collections