Fix error setting flags during seek