fix the bug showing devices from both old device table and new device table