handle master uncaughtException. fixed #403