fixed a bug in modifier-keys handling