fix type bug with the 'nth' sampling mode