Fix bugs trying to load the same file several times