change to enable model update

Hi,

I corrected a bug, where when you change a model in the "before-data-binding" event it would always return the previous model.

Please, take a look.

Thanks!