fixed a bug in seek