fix resource preloading error