Fixed a missing end and made exception messages from PAC better.