Bugfix: removed debug printing; added check for result existence.