diff --git a/TODO b/TODO
index 73f53618fdfdef3203b1b0a4c1b758dce3529251..755b66d40fadcc06422c9ce89c81b74397b967ec 100644
--- a/TODO
+++ b/TODO
@@ -8,8 +8,6 @@ $Id$
 
 Version 1.4.0:
 
-* Race in jiffies frame timeout.
-* Move EC_NUM_SYNCS define to ecrt.h.
 * Read Pdo mapping for unknown Pdos before configuring them.
 * Attach Pdo names from SII or Coe dictioary to Pdos read via CoE.
 * Make scanning and configuration run parallel (each).
@@ -21,6 +19,8 @@ Version 1.4.0:
 * Allow master requesting when in ORPHANED phase
 * Get original driver for r8169.
 * Distributed clocks.
+* Fix datagram errors on application loading/unloading.
+* Race in jiffies frame timeout?
 
 Future issues:
 
diff --git a/examples/mini/mini.c b/examples/mini/mini.c
index f0201dfbb7595d60466b51569071cc0ac665bff5..6f2abbe8d538e04993f644a26151ddfbd33bad70 100644
--- a/examples/mini/mini.c
+++ b/examples/mini/mini.c
@@ -320,7 +320,7 @@ int __init init_mini_module(void)
 
 #ifdef CONFIGURE_PDOS
     printk(KERN_INFO PFX "Configuring Pdos...\n");
-    if (ecrt_slave_config_sync_managers(sc_ana_in, EC_END, el3162_syncs)) {
+    if (ecrt_slave_config_pdos(sc_ana_in, EC_END, el3162_syncs)) {
         printk(KERN_ERR PFX "Failed to configure Pdos.\n");
         goto out_release_master;
     }
@@ -331,7 +331,7 @@ int __init init_mini_module(void)
         goto out_release_master;
     }
 
-    if (ecrt_slave_config_sync_managers(sc, EC_END, el2004_syncs)) {
+    if (ecrt_slave_config_pdos(sc, EC_END, el2004_syncs)) {
         printk(KERN_ERR PFX "Failed to configure Pdos.\n");
         goto out_release_master;
     }
diff --git a/examples/rtai/rtai_sample.c b/examples/rtai/rtai_sample.c
index fe0f588149dccc02433906f94b3552244ffd366e..5bea59b6ea1d6f4dd704eb0c549b008e79b2d607 100644
--- a/examples/rtai/rtai_sample.c
+++ b/examples/rtai/rtai_sample.c
@@ -300,7 +300,7 @@ int __init init_mod(void)
 
 #ifdef CONFIGURE_PDOS
     printk(KERN_INFO PFX "Configuring Pdos...\n");
-    if (ecrt_slave_config_sync_managers(sc_ana_in, EC_END, el3162_syncs)) {
+    if (ecrt_slave_config_pdos(sc_ana_in, EC_END, el3162_syncs)) {
         printk(KERN_ERR PFX "Failed to configure Pdos.\n");
         goto out_release_master;
     }
@@ -310,7 +310,7 @@ int __init init_mod(void)
         goto out_release_master;
     }
 
-    if (ecrt_slave_config_sync_managers(sc, EC_END, el2004_syncs)) {
+    if (ecrt_slave_config_pdos(sc, EC_END, el2004_syncs)) {
         printk(KERN_ERR PFX "Failed to configure Pdos.\n");
         goto out_release_master;
     }
diff --git a/include/ecrt.h b/include/ecrt.h
index 2c5b7244102f936c416f4b3517af2d83b93eae58..007ae90dacf8b8a03979671b7fff56c092a49721 100644
--- a/include/ecrt.h
+++ b/include/ecrt.h
@@ -125,12 +125,16 @@
 
 /*****************************************************************************/
 
-/** End of the Pdo entry list.
+/** End of list marker.
  *
- * This is used in ecrt_slave_config_pdos().
+ * This can be used with ecrt_slave_config_pdos().
  */
 #define EC_END ~0U
 
+/** Maximum number of sync managers per slave.
+ */
+#define EC_MAX_SYNC_MANAGERS 16
+
 /******************************************************************************
  * Data types 
  *****************************************************************************/
@@ -232,7 +236,7 @@ typedef enum {
  *
  * This is the data type of the \a entries field in ec_pdo_info_t.
  *
- * \see ecrt_slave_config_sync_managers().
+ * \see ecrt_slave_config_pdos().
  */
 typedef struct {
     uint16_t index; /**< Pdo entry index. */
@@ -246,11 +250,11 @@ typedef struct {
  * 
  * This is the data type of the \a pdos field in ec_sync_info_t.
  * 
- * \see ecrt_slave_config_sync_managers().
+ * \see ecrt_slave_config_pdos().
  */
 typedef struct {
     uint16_t index; /**< Pdo index. */
-    uint8_t n_entries; /**< Number of Pdo entries in \a entries to map.
+    unsigned int n_entries; /**< Number of Pdo entries in \a entries to map.
                               Zero means, that the default mapping shall be
                               used (this can only be done if the slave is
                               present at bus configuration time). */
@@ -265,12 +269,12 @@ typedef struct {
  *
  * This can be use to configure multiple sync managers including the Pdo
  * assignment and Pdo mapping. It is used as an input parameter type in
- * ecrt_slave_config_sync_managers().
+ * ecrt_slave_config_pdos().
  */
 typedef struct {
     uint8_t index; /**< Sync manager index. */
     ec_direction_t dir; /**< Sync manager direction. */
-    uint16_t n_pdos; /**< Number of Pdos in \a pdos. */
+    unsigned int n_pdos; /**< Number of Pdos in \a pdos. */
     ec_pdo_info_t *pdos; /**< Array with Pdos to assign. This must contain
                             at least \a n_pdos Pdos. */
 } ec_sync_info_t;
@@ -447,20 +451,21 @@ void ecrt_master_state(
 
 /** Configure a sync manager.
  *
- * Sets the direction of a sync manager. The direction bits from the default
- * control register from SII will be overriden, when this function is called.
+ * Sets the direction of a sync manager. This overrides the direction bits
+ * from the default control register from SII.
  *
  * \return zero on success, else non-zero
  */
 int ecrt_slave_config_sync_manager(
         ec_slave_config_t *sc, /**< Slave configuration. */
-        uint8_t sync_index, /**< Sync manager index. */
+        uint8_t sync_index, /**< Sync manager index. Must ba less
+                              than #EC_MAX_SYNC_MANAGERS. */
         ec_direction_t dir /**< Input/Output. */
         );
 
 /** Add a Pdo to a sync manager's Pdo assignment.
  *
- * \see ecrt_slave_config_sync_managers()
+ * \see ecrt_slave_config_pdos()
  * \return zero on success, else non-zero
  */
 int ecrt_slave_config_pdo_assign_add(
@@ -475,7 +480,7 @@ int ecrt_slave_config_pdo_assign_add(
  * ecrt_slave_config_pdo_assign_add(), to clear the default assignment of a
  * sync manager.
  * 
- * \see ecrt_slave_config_sync_managers()
+ * \see ecrt_slave_config_pdos()
  */
 void ecrt_slave_config_pdo_assign_clear(
         ec_slave_config_t *sc, /**< Slave configuration. */
@@ -484,7 +489,7 @@ void ecrt_slave_config_pdo_assign_clear(
 
 /** Add a Pdo entry to the given Pdo's mapping.
  *
- * \see ecrt_slave_config_sync_managers()
+ * \see ecrt_slave_config_pdos()
  * \return zero on success, else non-zero
  */
 int ecrt_slave_config_pdo_mapping_add(
@@ -502,7 +507,7 @@ int ecrt_slave_config_pdo_mapping_add(
  * This can be called before mapping Pdo entries via
  * ecrt_slave_config_pdo_mapping_add(), to clear the default mapping.
  *
- * \see ecrt_slave_config_sync_managers()
+ * \see ecrt_slave_config_pdos()
  */
 void ecrt_slave_config_pdo_mapping_clear(
         ec_slave_config_t *sc, /**< Slave configuration. */
@@ -523,27 +528,30 @@ void ecrt_slave_config_pdo_mapping_clear(
  * configuration time:
  *
  * \code
- * const ec_pdo_entry_info_t el3162_channel1[] = {
+ * ec_pdo_entry_info_t el3162_channel1[] = {
  *     {0x3101, 1,  8}, // status
  *     {0x3101, 2, 16}  // value
  * };
  * 
- * const ec_pdo_entry_info_t el3162_channel2[] = {
+ * ec_pdo_entry_info_t el3162_channel2[] = {
  *     {0x3102, 1,  8}, // status
  *     {0x3102, 2, 16}  // value
  * };
  * 
- * const ec_pdo_info_t el3162_pdos[] = {
+ * ec_pdo_info_t el3162_pdos[] = {
  *     {0x1A00, 2, el3162_channel1},
- *     {0x1A01, 2, el3162_channel2},
+ *     {0x1A01, 2, el3162_channel2}
  * };
  * 
- * const ec_pdo_info_t el3162_syncs[] = {
- *     {2, EC_DIR_INPUT, 2, el3162_el3162_pdos},
+ * ec_sync_info_t el3162_syncs[] = {
+ *     {2, EC_DIR_OUTPUT},
+ *     {3, EC_DIR_INPUT, 2, el3162_pdos},
+ *     {0xff}
  * };
  * 
- * if (ecrt_slave_config_syncs(sc, 1, el3162_syncs))
- *     return -1; // error
+ * if (ecrt_slave_config_pdos(sc_ana_in, EC_END, el3162_syncs)) {
+ *     // handle error
+ * }
  * \endcode
  * 
  * The next example shows, how to configure the Pdo assignment only. The
@@ -552,17 +560,18 @@ void ecrt_slave_config_pdo_mapping_clear(
  * configuration is left empty and the slave is offline.
  *
  * \code
- * const ec_pdo_info_t pdos[] = {
+ * ec_pdo_info_t pdos[] = {
  *     {0x1600}, // Channel 1
  *     {0x1601}  // Channel 2
  * };
  * 
- * const ec_sync_info_t syncs[] = {
- *     {2, EC_DIR_INPUT, 2, pdos},
+ * ec_sync_info_t syncs[] = {
+ *     {3, EC_DIR_INPUT, 2, pdos},
  * };
  * 
- * if (ecrt_slave_config_pdos(slave_config_ana_in, 2, syncs))
- *     return -1; // error
+ * if (ecrt_slave_config_pdos(slave_config_ana_in, 1, syncs)) {
+ *     // handle error
+ * }
  * \endcode
  *
  * Processing of \a syncs will stop, if
@@ -573,7 +582,7 @@ void ecrt_slave_config_pdo_mapping_clear(
  *
  * \return zero on success, else non-zero
  */
-int ecrt_slave_config_sync_managers(
+int ecrt_slave_config_pdos(
         ec_slave_config_t *sc, /**< Slave configuration. */
         unsigned int n_syncs, /**< Number of sync manager configurations in
                                 \a syncs. */
diff --git a/master/cdev.c b/master/cdev.c
index 895337573cb36c36bb40c96277a4988eb943a9e0..345de815cfc0aca2a59b13f4ef527748c55f17dd 100644
--- a/master/cdev.c
+++ b/master/cdev.c
@@ -1000,7 +1000,7 @@ int ec_cdev_ioctl_config(
     data.position = sc->position;
     data.vendor_id = sc->vendor_id;
     data.product_code = sc->product_code;
-    for (i = 0; i < EC_MAX_SYNCS; i++) {
+    for (i = 0; i < EC_MAX_SYNC_MANAGERS; i++) {
         data.syncs[i].dir = sc->sync_configs[i].dir;
         data.syncs[i].pdo_count =
             ec_pdo_list_count(&sc->sync_configs[i].pdos);
@@ -1035,7 +1035,7 @@ int ec_cdev_ioctl_config_pdo(
         return -EFAULT;
     }
 
-    if (data.sync_index >= EC_MAX_SYNCS) {
+    if (data.sync_index >= EC_MAX_SYNC_MANAGERS) {
         EC_ERR("Invalid sync manager index %u!\n",
                 data.sync_index);
         return -EINVAL;
@@ -1095,7 +1095,7 @@ int ec_cdev_ioctl_config_pdo_entry(
         return -EFAULT;
     }
 
-    if (data.sync_index >= EC_MAX_SYNCS) {
+    if (data.sync_index >= EC_MAX_SYNC_MANAGERS) {
         EC_ERR("Invalid sync manager index %u!\n",
                 data.sync_index);
         return -EINVAL;
diff --git a/master/fsm_coe_map.c b/master/fsm_coe_map.c
index 37a6c007e0a8df0b0d4657b4d5aed498297c4b43..ec7ceeb9237834986e0b8b304b7042b1221516a0 100644
--- a/master/fsm_coe_map.c
+++ b/master/fsm_coe_map.c
@@ -157,7 +157,7 @@ void ec_fsm_coe_map_action_next_sync(
 
     fsm->sync_index++;
 
-    for (; fsm->sync_index < EC_MAX_SYNCS; fsm->sync_index++) {
+    for (; fsm->sync_index < EC_MAX_SYNC_MANAGERS; fsm->sync_index++) {
         if (!(fsm->sync = ec_slave_get_sync(slave, fsm->sync_index)))
             continue;
 
diff --git a/master/fsm_pdo_assign.c b/master/fsm_pdo_assign.c
index 06ff374489ee71d47b5bf8bbfa340e3a2de9c83b..1448d2cbac6533b85cf7a20410c88c3f57f10a2d 100644
--- a/master/fsm_pdo_assign.c
+++ b/master/fsm_pdo_assign.c
@@ -166,7 +166,7 @@ void ec_fsm_pdo_assign_next_sync(
 {
     fsm->sync_index++;
 
-    for (; fsm->sync_index < EC_MAX_SYNCS; fsm->sync_index++) {
+    for (; fsm->sync_index < EC_MAX_SYNC_MANAGERS; fsm->sync_index++) {
         fsm->pdos = &fsm->slave->config->sync_configs[fsm->sync_index].pdos;
         
         if (!(fsm->sync = ec_slave_get_sync(fsm->slave, fsm->sync_index))) {
diff --git a/master/fsm_pdo_mapping.c b/master/fsm_pdo_mapping.c
index 89efe5b7c2db9ef2847399cf66c7032bc89f9821..55ef2abe586d45e43c89fa8737b8821f6b80758e 100644
--- a/master/fsm_pdo_mapping.c
+++ b/master/fsm_pdo_mapping.c
@@ -165,7 +165,7 @@ void ec_fsm_pdo_mapping_next_pdo(
     const ec_pdo_list_t *pdos;
     const ec_pdo_t *pdo, *assigned_pdo;
     
-    for (sync_index = 0; sync_index < EC_MAX_SYNCS; sync_index++) {
+    for (sync_index = 0; sync_index < EC_MAX_SYNC_MANAGERS; sync_index++) {
         pdos = &fsm->slave->config->sync_configs[sync_index].pdos;
 
         list_for_each_entry(pdo, &pdos->list, list) {
diff --git a/master/globals.h b/master/globals.h
index 07f4723b7a4ccf10542dba9406a8c1fec471e911..c1ea64f472fa44ec63f4175324c34146a4694450 100644
--- a/master/globals.h
+++ b/master/globals.h
@@ -93,9 +93,6 @@
 /** Maximum number of slave ports. */
 #define EC_MAX_PORTS 4
 
-/** Maximum number of sync managers per slave. */
-#define EC_MAX_SYNCS 16
-
 /** Size of a sync manager configuration page. */
 #define EC_SYNC_PAGE_SIZE 8
 
diff --git a/master/ioctl.h b/master/ioctl.h
index d22d37c4b0410ef26bae697ffb110a7c4fdc4f25..a170f96ca6b6685660b350a81136a56f8576f676 100644
--- a/master/ioctl.h
+++ b/master/ioctl.h
@@ -47,6 +47,8 @@
 
 /*****************************************************************************/
 
+/** \cond */
+
 #define EC_IOCTL_TYPE 0xa4
 
 #define EC_IO(nr)           _IO(EC_IOCTL_TYPE, nr)
@@ -294,11 +296,10 @@ typedef struct {
     struct {
         ec_direction_t dir;
         uint32_t pdo_count;
-    } syncs[16];
+    } syncs[EC_MAX_SYNC_MANAGERS];
     uint32_t sdo_count;
     uint8_t attached    : 1,
             operational : 1;
-    
 } ec_ioctl_config_t;
 
 /*****************************************************************************/
@@ -347,4 +348,6 @@ typedef struct {
 
 /*****************************************************************************/
 
+/** \endcond */
+
 #endif
diff --git a/master/master.c b/master/master.c
index 64ff627a56f13ca2a7e219597c27e9672e8ae7fd..01be661802b87b74ae18d6624519d0ca834add90 100644
--- a/master/master.c
+++ b/master/master.c
@@ -1122,6 +1122,9 @@ unsigned int ec_master_domain_count(
 
 /*****************************************************************************/
 
+/** Common implementation for ec_master_find_domain() and
+ * ec_master_find_domain_const().
+ */
 #define EC_FIND_DOMAIN \
     do { \
         list_for_each_entry(domain, &master->domains, list) { \
@@ -1142,8 +1145,6 @@ ec_domain_t *ec_master_find_domain(
     EC_FIND_DOMAIN;
 }
 
-/*****************************************************************************/
-
 const ec_domain_t *ec_master_find_domain_const(
 		const ec_master_t *master, /**< EtherCAT master. */
 		unsigned int index /**< Domain index. */
diff --git a/master/slave.c b/master/slave.c
index c6d929f993367819dc78c37b02afac1ee0cd91d5..f486ac885327aa6ff3454ce117c30e0bfb59ff22 100644
--- a/master/slave.c
+++ b/master/slave.c
@@ -365,7 +365,7 @@ int ec_slave_fetch_sii_syncs(
 
     if (count) {
         total_count = count + slave->sii.sync_count;
-        if (total_count > EC_MAX_SYNCS) {
+        if (total_count > EC_MAX_SYNC_MANAGERS) {
             EC_ERR("Exceeded maximum number of sync managers!\n");
             return -1;
         }
diff --git a/master/slave_config.c b/master/slave_config.c
index dd73366e437cf24431ebf2ac504a2e9da17018f6..7393e2fcd1aca90627540720062605867a535f63 100644
--- a/master/slave_config.c
+++ b/master/slave_config.c
@@ -70,7 +70,7 @@ void ec_slave_config_init(
     sc->product_code = product_code;
     sc->slave = NULL;
 
-    for (i = 0; i < EC_MAX_SYNCS; i++)
+    for (i = 0; i < EC_MAX_SYNC_MANAGERS; i++)
         ec_sync_config_init(&sc->sync_configs[i]);
 
     INIT_LIST_HEAD(&sc->sdo_configs);
@@ -95,7 +95,7 @@ void ec_slave_config_clear(
     ec_slave_config_detach(sc);
 
     // Free sync managers
-    for (i = 0; i < EC_MAX_SYNCS; i++)
+    for (i = 0; i < EC_MAX_SYNC_MANAGERS; i++)
         ec_sync_config_clear(&sc->sync_configs[i]);
 
     // free all Sdo configurations
@@ -242,7 +242,7 @@ void ec_slave_config_load_default_sync_config(ec_slave_config_t *sc)
     if (!sc->slave)
         return;
     
-    for (sync_index = 0; sync_index < EC_MAX_SYNCS; sync_index++) {
+    for (sync_index = 0; sync_index < EC_MAX_SYNC_MANAGERS; sync_index++) {
         sync_config = &sc->sync_configs[sync_index];
         if ((sync = ec_slave_get_sync(sc->slave, sync_index))) {
             sync_config->dir = ec_sync_default_direction(sync);
@@ -361,7 +361,7 @@ int ecrt_slave_config_sync_manager(ec_slave_config_t *sc, uint8_t sync_index,
         EC_DBG("ecrt_slave_config_sync_manager(sc = 0x%x, sync_index = %u, "
                 "dir = %u)\n", (u32) sc, sync_index, dir);
 
-    if (sync_index >= EC_MAX_SYNCS) {
+    if (sync_index >= EC_MAX_SYNC_MANAGERS) {
         EC_ERR("Invalid sync manager index %u!\n", sync_index);
         return -1;
     }
@@ -387,7 +387,7 @@ int ecrt_slave_config_pdo_assign_add(ec_slave_config_t *sc,
         EC_DBG("ecrt_slave_config_pdo_assign_add(sc = 0x%x, sync_index = %u, "
                 "pdo_index = 0x%04X)\n", (u32) sc, sync_index, pdo_index);
 
-    if (sync_index >= EC_MAX_SYNCS) {
+    if (sync_index >= EC_MAX_SYNC_MANAGERS) {
         EC_ERR("Invalid sync manager index %u!\n", sync_index);
         return -1;
     }
@@ -416,7 +416,7 @@ void ecrt_slave_config_pdo_assign_clear(ec_slave_config_t *sc,
         EC_DBG("ecrt_slave_config_pdo_assign_clear(sc = 0x%x, "
                 "sync_index = %u)\n", (u32) sc, sync_index);
 
-    if (sync_index >= EC_MAX_SYNCS) {
+    if (sync_index >= EC_MAX_SYNC_MANAGERS) {
         EC_ERR("Invalid sync manager index %u!\n", sync_index);
         return;
     }
@@ -443,7 +443,7 @@ int ecrt_slave_config_pdo_mapping_add(ec_slave_config_t *sc,
                 (u32) sc, pdo_index, entry_index, entry_subindex,
                 entry_bit_length);
 
-    for (sync_index = 0; sync_index < EC_MAX_SYNCS; sync_index++)
+    for (sync_index = 0; sync_index < EC_MAX_SYNC_MANAGERS; sync_index++)
         if ((pdo = ec_pdo_list_find_pdo(
                         &sc->sync_configs[sync_index].pdos, pdo_index)))
             break;
@@ -473,7 +473,7 @@ void ecrt_slave_config_pdo_mapping_clear(ec_slave_config_t *sc,
         EC_DBG("ecrt_slave_config_pdo_mapping_clear(sc = 0x%x, "
                 "pdo_index = 0x%04X)\n", (u32) sc, pdo_index);
 
-    for (sync_index = 0; sync_index < EC_MAX_SYNCS; sync_index++)
+    for (sync_index = 0; sync_index < EC_MAX_SYNC_MANAGERS; sync_index++)
         if ((pdo = ec_pdo_list_find_pdo(
                         &sc->sync_configs[sync_index].pdos, pdo_index)))
             break;
@@ -490,7 +490,7 @@ void ecrt_slave_config_pdo_mapping_clear(ec_slave_config_t *sc,
 
 /*****************************************************************************/
 
-int ecrt_slave_config_sync_managers(ec_slave_config_t *sc,
+int ecrt_slave_config_pdos(ec_slave_config_t *sc,
         unsigned int n_syncs, const ec_sync_info_t syncs[])
 {
     unsigned int i, j, k;
@@ -499,7 +499,7 @@ int ecrt_slave_config_sync_managers(ec_slave_config_t *sc,
     const ec_pdo_entry_info_t *entry_info;
 
     if (sc->master->debug_level)
-        EC_DBG("ecrt_slave_config_sync_managers(sc = 0x%x, n_syncs = %u, "
+        EC_DBG("ecrt_slave_config_pdos(sc = 0x%x, n_syncs = %u, "
                 "syncs = 0x%x)\n", (u32) sc, n_syncs, (u32) syncs);
 
     if (!syncs)
@@ -511,7 +511,7 @@ int ecrt_slave_config_sync_managers(ec_slave_config_t *sc,
         if (sync_info->index == 0xff)
             break;
 
-        if (sync_info->index >= EC_MAX_SYNCS) {
+        if (sync_info->index >= EC_MAX_SYNC_MANAGERS) {
             EC_ERR("Invalid sync manager index %u!\n", sync_info->index);
             return -1;
         }
@@ -572,7 +572,7 @@ int ecrt_slave_config_reg_pdo_entry(
                 "subindex = 0x%02X, domain = 0x%x, bit_position = 0x%x)\n",
                 (u32) sc, index, subindex, (u32) domain, (u32) bit_position);
 
-    for (sync_index = 0; sync_index < EC_MAX_SYNCS; sync_index++) {
+    for (sync_index = 0; sync_index < EC_MAX_SYNC_MANAGERS; sync_index++) {
         sync_config = &sc->sync_configs[sync_index];
         bit_offset = 0;
 
@@ -731,7 +731,7 @@ EXPORT_SYMBOL(ecrt_slave_config_pdo_assign_add);
 EXPORT_SYMBOL(ecrt_slave_config_pdo_assign_clear);
 EXPORT_SYMBOL(ecrt_slave_config_pdo_mapping_add);
 EXPORT_SYMBOL(ecrt_slave_config_pdo_mapping_clear);
-EXPORT_SYMBOL(ecrt_slave_config_sync_managers);
+EXPORT_SYMBOL(ecrt_slave_config_pdos);
 EXPORT_SYMBOL(ecrt_slave_config_reg_pdo_entry);
 EXPORT_SYMBOL(ecrt_slave_config_sdo);
 EXPORT_SYMBOL(ecrt_slave_config_sdo8);
diff --git a/master/slave_config.h b/master/slave_config.h
index 2961db417b05d66e3f67284142cda32853b05cb5..cc3033eda2f33fe8766b46c93e6cfb29f390b046 100644
--- a/master/slave_config.h
+++ b/master/slave_config.h
@@ -67,7 +67,7 @@ struct ec_slave_config {
     ec_slave_t *slave; /**< Slave pointer. This is \a NULL, if the slave is
                          offline. */
 
-    ec_sync_config_t sync_configs[EC_MAX_SYNCS]; /**< Sync manager
+    ec_sync_config_t sync_configs[EC_MAX_SYNC_MANAGERS]; /**< Sync manager
                                                    configurations. */
     ec_fmmu_config_t fmmu_configs[EC_MAX_FMMUS]; /**< FMMU configurations. */
     uint8_t used_fmmus; /**< Number of FMMUs used. */
diff --git a/tools/Master.cpp b/tools/Master.cpp
index b273b0dfcf98b9ae3f7230de96739f30f0d17739..70c00a2062ebc029b1211e48059b9d9179d849f0 100644
--- a/tools/Master.cpp
+++ b/tools/Master.cpp
@@ -1001,7 +1001,7 @@ void Master::showConfigs()
             << "Attached: " << (config.attached ? "yes" : "no") << endl
             << "Operational: " << (config.operational ? "yes" : "no") << endl;
 
-        for (j = 0; j < 16; j++) {
+        for (j = 0; j < EC_MAX_SYNC_MANAGERS; j++) {
             if (config.syncs[j].pdo_count) {
                 cout << "SM" << dec << j << " ("
                     << (config.syncs[j].dir == EC_DIR_INPUT