Security is a critical and vital task in wireless sensor networks (WSNs), therefore different key management systems have been proposed, many of which are based on symmetric primitives. Such systems are very energy efficient, but they lack some other desirable characteristics. On the other hand, systems based on public key cryptography (PKC) have those desirable characteristics, but they consume more energy. Recently based on authenticated messages from base station (BS) a new PKC– based key agreement protocol was proposed. We show this method is susceptible to a form of denial of service (dos) attack where resources of network can be exhausted with bogus messages. Then, we propose two different improvements to solve this vulnerability. Simulation results show that these new protocols retain desirable characteristics of the basic method but solve its deficiencies.