Fixed delete(), improved selectJoin()