fix all kinds of crashes, get messages pushed to server