Fix for manual joins not keeping the right order / using wrong table