Fix fread and memmove (thanks ComputerNerd)