fixes bug in reading libdevice