TRUNK-2894 Applied given patch. Resolved ticket.

https://tickets.openmrs.org/browse/TRUNK-2894 Please code review.