fix a few padding and overlap problems