fixes various padding issues