Some fixes for new resource handling