fix a bug with the last commit where distribution didn't work correctly