Prevent deadlock