fix bug with filename when no domain is supplied