Fixed a bug when computing IRFs