Need help with loops and switches

The switch is connected on kind of like this. The relay is constantly looping.

COM is the middle pin, NC is the left one.

The wiring is shown in the attachments.