cleanup of loading and reloading