reverted revert and re-applied fix for db join elements field not populating