Remove debug and fix regression with margins