*pt78508632* Fix bug in logic and change error message.