fix stats page problems due to mongoose update