padding and rules fix