Fried pies lose their shape
"Filled with nuts" and "edges are sealed" - this is normal to happen with such a food. The filling produces steam, which blows up the pie. You should use less filling and pierce it in a place or two before frying, so you'll have less steam, and what is in there will escape.