Fixed a bug that selecting a value from the typeahead dropdown didn't work.
prevented a bug that a tag was added twice.
fixed a bug that the deferred was not rejected, in case of an error case.
fixed a bug in the with_locals directive.
upgraded typeahead version to 10.1 and fixed issues.