Troy Palmer in $27m debt deal to avoid bankruptcy