the previous fix introduces another deadlock