GATEWAY-3309: fixes after clarification on code review comment.