Fix adding resource