diff --git a/src/device.c b/src/device.c
index 9021914..1f7c895 100644
--- a/src/device.c
+++ b/src/device.c
dst = device_get_address(dev);
ba2str(dst, dstaddr);
- if (gatt_db_isempty(dev->db))
- load_gatt_db(dev, srcaddr, dstaddr);
-
gatt_client_init(dev);
gatt_server_init(dev, btd_gatt_database_get_db(database));
+ if (gatt_db_isempty(dev->db))
+ load_gatt_db(dev, srcaddr, dstaddr);
+
/*
* Remove the device from the connect_list and give the passive
* scanning another chance to be restarted in case there are