Fix write in hard drive bug