How to get rid of the extra arrow

How to get rid of the extra arrow

When I click the first time on the arrow it displays properly

Image



When I click the second time on the arrow it displays a extra arrow at the bottom

Image




Can anyone tell me how can I get rid of the arrow if I click it the second time it initailly Should look like the 1st image when I click on it the second time on it. Thanks in advance

Code