Fixed incorrect tag_device and untag_device method calls