Merged rev7 from trunk