Make it work with named resources