Fix WAL problems