fixed bugs with void and checked exceptions