fix shutdown - properly stop webserver