It's not so much that you overdosed, it's that you used the wrong kind of algaecide. I'm betting you used the cheap 10% stuff in the gallon jug. That is notorious for foaming, even when used in the proper quantities. You want to look for polyquat in the future, the 60% stuff. It's more expensive, but doesn't turn you pool into a foam party.

http://www.poolsolutions.com/gd/polyquat.html

Michael