chore: fix nil devices and certificates