Weird issue where files keep getting reverted