It may be that you didn’t use quite enough butter for the amount of dry ingredients, you may not have cooked it long enough or you tried to move or cut the slice while it was still warm. The reason for this is the butter is the only liquid holding everything together - there's no eggs or condensed milk to help bind it all. So, while the butter is hot, it's still in a liquid form. Once it cools, it will set, holding the slice together firmly and keep it's shape.