Fix update

In case fields is a function, it needs to be set as undefined. I should
set up travis.
Set up travis