Fized clearDevices() bug