fix Device getParam, use the actual index instead the array pos