improved auto-reloading