Spectator effects in the heavy quark effective theory