Origin validation fix