fix form clearing problem