[TRUNK-3258] made some changes to my previous commit
Merge pull request #381 from k-joseph/TRUNK-3258

TRUNK-3258