Error callback fix