UK to end automatic release of terror convicts