Fixes to tail()