handle fatal error

fix #88