Close function problem.

Didn't seek to the beginning