need help with SX1509

Hello,

I need to connect four SX1509 to arduino and to use it like a keyboard. I've tried with "sx1509_keypad" example and I've created different objects for every single expander.
The init function gives me one for every single on startup, but I am getting strange behavior. Some times when I upload I have output from the buttons and some times not or I have only from one or two of them.

Can anyone help me?
Thanks in advance!

I am attaching my sketch.

kosmi.ino (8.37 KB)