Fixed a potential bug in normalizing the filter output.