Fixed issue with calling process_device from various points