fixed a bug of inverse gamma