Fix bugs on <upload> and <gallery> fields.