Improved removing unexpected symbols from DB name.
Added checking already set domain.