Small changes to the extractor
I have made these changes a while back and they're quite small but at the same time prevent it from crashing in some cases. Just wanted to merge it to master and delete the branch(?) if it isn't neccessary.
Edited by Rokas Giedraitis