Fixed bug in resource extractor