Changed handler of exeptions