My question involves collection proceedings in the State of: Pennsylvania

I recently had a law firm associated with a junk debt buyer that filed a civil suit in the court of common pleas attempting to collect a debt that is time barred under the statute of limitations per 42 Pa. C.S. 5525(a).

When I was served with the suit I promptly filed an answer Pro SE bringing up the 4 year statute of limitations as a defense. The law firm's own evidence showed the last date of activity was July of 2009 and they filed the suit in October of 2013 which was past the 4 year statute of limitations.

At that point I followed up with a motion to dismiss since the debt in question is time barred and the law firm's time ran out to seek relief through the court. A couple of weeks later the judge responds with an order for specific performance and says that he does not care what the statute of limitations says, and that he has a right to enforce specific performance as it has a 5 year statute of limitations and he reserves the right to assist the plaintiff in this matter.

My questions are this.

The plaintiff's complaint was to seek judgement to collect a time barred debt, and at no point did they make any amended complaint, nor motion to seek specific performance. Specific performance was simply pulled out of the hat by the judge. Can the judge do this despite the complaint being filed after the 4 year statute of limitations expired and not even brought up by the plaintiff as an argument? Should I consider appealing this to The Superior Court?