Iraq 's central criminal court had sentenced Zaidi to three years in jail for assaulting a visiting head of state , but the courts later shortened his sentence to one year and then ordered him released this month .