added test for bug and gave Mongo a timestamp sort to guarantee order