Using scope.query instead of 'http'

This fixes #742.