fix a few bugs in tail view