Fix "Invalid form" bug