fixed minor bug in bandpass calculation