code modifications to take care of latest server side changes regarding replace updates