dead lock fixed