Ref:#1101 - patch for 1.5.6.1 branch.