The calculation of transaction ids did not ensure that the result is always greater or equal zero. To avoid conflicts with the error codes returned by coap_send(), the calculation now masks out the lower half.