Some fixes to field.js