Correct sample dereferencing