fix an issue when running on device