keyboard fix (taken from _Andy_, thx)