Fixed material loading bug