Implement rescue for servers. Fixes #285