Fixed keyboard not working in Linux.

Signed-off-by: Janne Hakonen <janne.hakonen@oss.tieto.com>
Workaround for heap corruption bug.

Signed-off-by: Janne Hakonen <janne.hakonen@oss.tieto.com>