Fix default direction and ag-test doctype