Added check for sub domain