fix open mode