Gittrac #4115: Made changes as per adesmet's code review.