fixed bug in reloading files