Fix attachInterrupt behaviour