Fixed image io bug