Fixed sqlite orientedness