Fixes issue with stale elements