fixing broken tail error