Add support for head and tail in qzitche mode