fixing exception wrapper