added check to href before joining