Fix bug with reassigning the variable.
Fixed a bug #1. Added a exception handling in UI.