fix patch when device changed.