Fix resource delete