fix default open mode by using the value we used for apr