Dear Namjim -- My experience with heating agar solutions is that if you have overflow, a larger container is the best solution. I often use containers which are nominally 10X the volume of the solution I am making. Also, using a lower heat may help, but try the larger container first. Harry