Fix the systray, and other minor improvement