bug fix for getting the current domain