fixed loop and reloading