fix update logic for Mac