fixed a bug where error messages in forms wouldn't be cleared appropriately