Sampling fix
No need to calculate length twice