cleanup extra space in head