Fixing debug lines and padding generation (don't generate padding if diff 0 or negative).