TRUNK-4140 did some minor changes according to comments

did some changes according to comments in
https://github.com/openmrs/openmrs-core/pull/824