Initializing values in Mesh class, which could cause conditional jump based on uninitialize value.
Fixed destructor in Program class. Iterator was invalidated.