Refactored changes to Client from 9d16a172414de37b6d35b1995b08eb7427c2d159 to fix 5.3.x test failures