Convenience functions and workaround for bugs in rmongodb