Prevents crash caused by github issue 1. Still has annoying
disconnect/reconnect, but no crash at least.