Added refresh when source changes.

Fixed bug in setter and in AJAX error handling.