fix crash on close of linux client