Before the end of the war in 401 b.c. , many islands had already transferred their allegiance to the victors , who were led by Philip II of Macedon .
Philip II of Macedon punished those islands who failed to transfer their allegiances .