style debounce and a few bug fixes