Who was kept imprisoned by John for many years?