Form validation fix