Fixing switch case bugs on forms