Fix/refreshupdatesites

Hello Nicholas,

I've improved refreshing of update sites with this PR. Please see the commits for more info. It works with my extension, but I've not tested the update process with your extension. It should work though if I didn't make a typo or overlooked a small difference.

Kind regards,
Jurian Even