The adaptive data rate (ADR) algorithm is a key component of the LoRaWAN protocol which controls the performance of a LoRaWAN Network. This modifies the data rate parameter of a device based on the current wireless conditions. In this article, we present substantive enhancements for the End Device and Network Server which reduce the convergence time for LoRaWAN devices to reach their optimal data rate. We extend the LoRaWAN module in ns-3 by adding ADR, enabling the simulation of realistic LoRaWAN networks, and add the implementation of the new enhancements in this module. The simulations show that these modifications can result in a significant reduction of the data rate convergence time for LoRaWAN devices and lead to an increased overall packet delivery rate for the network in a dynamic network environment. Our contributions are a publicly available implementation of ADR in ns-3, an analysis of the original algorithm behavior, and a novel version of the algorithm with enhancements that improve performance in every case while remaining easily integrable into an existing LoRaWAN system.