Fix to the server crash issue caused due to missing end