Fixed order.statement when joining other tables
Fixed join statements if fields have same name as AR