fix support for long fields + tests