Fix: raise correct error in accelerate mode