[OFBIZ-2618] Applying patch contributed by Arun Patidar. Thanks Arun for updated fix.
Thanks BJ for reporting the issue and providing first patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632764 13f79535-47bb-0310-9956-ffa450edef68