fixed a bug in fractional amplitude code