Allow setResource to take array