Fixed loadResource being called statically