Resource loading bug fixed