make devices index can be displayed correctly