Fixes a bug with the ng-model values from the input elements.