fix wrong end