fix problem with assertion testing and stop server