memory optimization and minor bug fix
Merged refs/pull/3714/head from repository cms-sw