Better error handling on joins