Bug in AutoregisterMultiple fixed & tests

And rebased it.