Better tests and fixed the reload handling