Fixed a bug with processDevice()