Re-add some code from 1.1.2 that was made to fix suspected deadlocking