fixed several minor issues, use parseSelector() in join conditions