Experiment aborting instead of ending

At the end of the experiment I have test appear that says “This is the end. Press space to end the experiment.” However, when they press space a pop up appears saying it’s an invalid key, and then shows that the experiment was aborted? How do I properly end the experiment so it does not show as aborted?