Arduino nano just stops randomly

I didn't draw three more buttons, they are on pins 6,7,8 and connected to the ground.