Backporting fix from trunk r1626464
[OFBIZ-5711] Nice catch. Thanks Rong Nguyen for reporting and Deepak Dixit for the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/branches/release13.07@1626466 13f79535-47bb-0310-9956-ffa450edef68