removeDevice method - bugfix