some small fixes for trayicon support