Fix mongoose plugin