Bug in output after join