Fix bug where the signal integral was incorrectly calculated