Fixing subsql