Make extend() return manager instance.
Merge pull request #2609 from franzliedke/patch-14

Make extend() return manager instance.