fixes #1 . using shift instead of pop, to account for sorting used

quick fix, to correct issue with wrong config entry (when a collection is returned per a name) value is used