@matthew-andrews please write a test for this.