fixed support for outer joins, updated tests