Bugfix to sample comparison error