Added autodetection of resource ids