Fixed buddy.c. Awaiting testing.