Bugfix for exception with empty results