Badly made fix for IO fails