Fixed action buttons with an Action value over 0xFFFF.

Fixes a bug mentioned in issue #351