Fixed segmentation fault when the app ends before the calc server has been built