Optimize update check code

HELL YEAH