fix indicator sql calls