Fixing CP js errors on field edit screen