small bugfixes and bump to newest mongoose version