fixed tail error