fix minor bug, don't know a better way to do this.