dead lock at exit fixed