fixed IO errors