Wrongly-imprisoned man freed from jail after 17 years