Fix bug with handlers stacking