Use DirectCollection for renaming the collection.
Not needed anymore.
Don't wait for a constant amount of time, but monitor all queries to finish.
Bugfix.