FIX: don't use a JOIN as it might cause problems in this case

Closes #159