Fixed bug where the update flag wouldnt update