Merge pull request #287 from alex/rescue

Implement rescue for servers. Fixes #285