Enhance the server shell logic.