fix bugs about device adjustment