Mongoid migration done. Middleware bug fixed