stop infinite loop caused by changing margins over and over