fix device registration