fixing cloud code