Fix foreman and master names comparison