index and loss page validation fix