Trying to get rid of this deadlock