fixed retarded bug in resource loading.