Fix some fucking deadlocks