Fixed bug with multiple cloud instance and clean up properly (not appending to the right element initially)