fixed the exceptions bug