Fixed sql error regarding slot order scope.