Did you add any type of algaecide? Many of them will cause foaming.