Fix an erroneous function call

This was causing file preview to fail on the second attempt.