Workaround for deadlock

@slimsag  please test and confirm thanks