fixes for errors in the log, the formstate can be null just between 2
digest loops (because update controller happens)
made the functions that are executed in the digest loop way smaller
(depend more on the selection change)