[bugfix] end handlers are optional