Glitch when closing a path with pen tool

I’m drawing paths using the pen tool, and holding down option as I go, in order to define corner points, like so:

But when I complete the path (connect to the first point), it snaps the previous point into a curve point:

Is there a way around this?


It was probably drawn as a curve point. But you are right, it should be treated as a corner point.

Workaround 1: double click the top right point with the select tool. Then connect.

Workaround 2: when drawing the top right point, hold down the alt key while dragging the handle.