Added context shutdown in dispatcher. Renamed close method.