fixing bug where domain name wasnt getting correctly passed to create element