fixed bug with key-release event. Related issue #21