trim space in the head