The blob at the end of the pin is usually the end of the wire, melted. When you heat the wire enough, it simply melts back onto itself, and forms the ball. Also, close to where metal is heated, it becomes more pliable. Perhaps this was the cause of the ball coming off, if there was some space...