fix search bugs
fix marking position bug