fix device functions