fix broken seek implementation