In 1937 , he was sentenced to ten years for Communist activities and remained in captivity until the end of World War II . In 1937 , he was sentenced to ten years for Communist activities and remained a prisoner until the end of World War II .