fix smart deadlock