TRUNK-3258

made some changes to my previous commit that was merged into openmrs-core