Fixed read preference inheritance as well as aggregate helper, added tests Issue #999 and #995