Fix form value casting