fix error cases in subresources