Fix device installation in second stage setup