Fixing bug with cloud sync