Merged changes from aggregator_wrappers branch - closes and fix #740