update name, fix middleware