fixed keypress and publisher segfault on plugin reload
minor fix