Fix bug with dispatcher