Add server exit support
Fix merging problem