fix compatibility
fix seeking top directory bug