Added nested select test, made nested select work.