Fix bug to work in different devices