Try to fix some logic error in CheckForUpdate

I don't know what I am doing, but apparently I am not the only one!