Apple patches iPhone bugs, disables unlocked devices