Prevent array manipulation appending empty divs on push/pop/set