Fixed Deadlock situation