Fix exceptions tests bug