Fixed random generation to respsect size.