Tried fixing the deadlock