don't print empty head/tail