Fix bug with distribution