add check of master change to keep consistency safe