fix for subselects