Bug with passing Linf as a global variable to the sampling code. Fixed now.