fixing JOINREP