fixed handling on error and after kill