Modify debounce to use $timeout in order to catch things in digest cycle