Fixed and accidentally reintroduced deadlock.