Foaming is strange stuff. There are lots of ways to make it happen. You pretty much need to have everything right to take care of it. That assumes you do want carbonated beer
. I've seen a number of solutions that seem to involve no bubbles in the end product...