I froze a bottle of water with a small amount of air at the top, and when I pulled it out and removed the cap, the water had expanded all the way to the cap. Now this is to be expected, but I just left the cap off and expected it to slowly melt. Water started building up on top of the ice, eventually running down the side each time too much accumulated. I would have figured that since water expands when it freezes, it would actually shrink back down to its original size when melting, not overflow. Why would it have done this?

PS: the bottom of the bottle pushed out a little bit as a result of the ice expanding, but it still hadn't returned to its original shape, so I'm tempted to not think it's a result of the bottle relaxing...