fix fatal error on lack of device on linux