fix valgrind uninitialised value error, hopefully fixed crash after key polling