fixed #1 : see mongoose branch