Find a more generic way to control this.