Fixed some corruption bugs from Dropbox syncing.